<?php
/*
 * Created on 2016/11/13
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
 	session_start();
 	$loginUser = $_POST["loginUser"];
 	$loginPwd = $_POST["loginPwd"];
 	require_once("../service/InsertUser.class.php");
 	require_once("../entity/user.inc.php");
 	$user = new InsertUser();
 	$result = $user -> queryUser($loginUser,md5($loginPwd));//获取用户信息
	$array = 0;
	if(json_decode($result)){
	  $array = 1;
	}
 	//$array = count(json_decode($result));
 	if($array==0){
 		echo 0;
 	}else{
 		$_SESSION["userInfo"]=$result;
 		echo 1;
 	}
 	
?>
